Skip to content

feat(vortex-geo): ST_Distance via the geo crate + Polygon type#8497

Merged
HarukiMoriarty merged 3 commits into
developfrom
vortex-geo-pr
Jun 19, 2026
Merged

feat(vortex-geo): ST_Distance via the geo crate + Polygon type#8497
HarukiMoriarty merged 3 commits into
developfrom
vortex-geo-pr

Conversation

@HarukiMoriarty

Copy link
Copy Markdown
Contributor

Summary

  1. offload the math to geo: unification, one distance (and remaining geo functions) implementation, replace the hand-roll kernel.
  2. support polygon: as a second native type riding that same path
  3. all geometry decode goes through Arrow/geoarrow

The performance decreased (5.6ms -> 12ms on Q1) compared with the old direct-coordinate kernel, it is a tradeoff for one unified, general decode path. The cost is the intermediate allocation/enumeration, not the math itself. Type-specialized fast paths (e.g. point-point straight off the coordinate struct) can recover it later without changing the API.

Testing

4 distance behavior tests through geo crate, and tests for polygon type.

@HarukiMoriarty HarukiMoriarty requested a review from a team June 18, 2026 19:03
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@codspeed-hq

codspeed-hq Bot commented Jun 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 11 improved benchmarks
❌ 7 regressed benchmarks
✅ 1563 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decompress_rd[f64, (10000, 0.01)] 108.9 µs 138.9 µs -21.64%
Simulation decompress_rd[f64, (10000, 0.1)] 109.2 µs 139.3 µs -21.62%
Simulation decompress_rd[f64, (10000, 0.0)] 108.9 µs 138.9 µs -21.61%
Simulation decompress_rd[f32, (100000, 0.0)] 496.1 µs 583.7 µs -15.01%
Simulation decompress_rd[f32, (10000, 0.01)] 78.2 µs 90.6 µs -13.64%
Simulation decompress_rd[f32, (10000, 0.1)] 78.2 µs 90.6 µs -13.64%
Simulation decompress_rd[f32, (10000, 0.0)] 78.7 µs 91 µs -13.6%
Simulation take_10k_first_chunk_only 251.3 µs 206.5 µs +21.73%
Simulation decompress_rd[f64, (100000, 0.01)] 1,020.9 µs 842.6 µs +21.16%
Simulation decompress_rd[f64, (100000, 0.1)] 1,020.9 µs 842.6 µs +21.16%
Simulation take_10k_dispersed 264.8 µs 220.2 µs +20.25%
Simulation decompress_rd[f32, (100000, 0.1)] 583 µs 495.3 µs +17.72%
Simulation decompress_rd[f32, (100000, 0.01)] 583 µs 495.3 µs +17.72%
Simulation bitwise_not_vortex_buffer_mut[128] 244.4 ns 215.3 ns +13.55%
Simulation patched_take_10k_adversarial 259.7 µs 229.6 µs +13.1%
Simulation patched_take_10k_first_chunk_only 282.9 µs 252.7 µs +11.97%
Simulation patched_take_10k_dispersed 297 µs 266.9 µs +11.31%
Simulation bitwise_not_vortex_buffer_mut[1024] 304.7 ns 275.6 ns +10.58%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing vortex-geo-pr (a9b93a4) with develop (9814173)

Open in CodSpeed

@HarukiMoriarty HarukiMoriarty enabled auto-merge (squash) June 19, 2026 19:15
@HarukiMoriarty HarukiMoriarty merged commit dc3fa49 into develop Jun 19, 2026
85 of 86 checks passed
@HarukiMoriarty HarukiMoriarty deleted the vortex-geo-pr branch June 19, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants